package algorithm;

/**
 * 代码块的测试
 */
public class BlockTest {

    private int id;

    static {
        System.out.println("静态代码块1");
    }

    static {
        System.out.println("静态代码块2");
    }


    {
        System.out.println("非静态代码块1");
    }

    {
        System.out.println("非静态代码块2");
    }

    public BlockTest() {
        System.out.println("构造器");
    }

    public static void main(String[] args) {


        BlockTest t =new BlockTest();
        System.out.println("---");
        BlockTest t2 =new BlockTest();
        System.out.println("---");
        BlockTest t3 =new BlockTest();
    }
}
